#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n,i, j, k = 0;
	for (n = 100; n <= 999; n++)
	{
		int i = n / 100;
		int k = n / 10 % 10;
		int j = n % 10;
		if (i * i * i + j * j * j + k * k * k == n)
		{
			printf("%d\n", n);
		}
	}
	return 0;
}